package com.mmr.dxp.mapper;

import com.mmr.dxp.domain.OrganInfo;
import com.mmr.dxp.domain.RdsResourceObject;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface RdsResourceMapper {
    @Select("SELECT ID,NAME,ORG_ID FROM RDS_FILE_FOLDER_TABLE WHERE ID = #{id}")
    @Results(id="rdsResourceMap", value={
            @Result(column="ID", property="id", jdbcType= JdbcType.VARCHAR, id=true),
            @Result(column="ORG_ID", property="organInfo", javaType= OrganInfo.class,
                    one=@One(select="com.tongtech.blockchain.dxp.mapper.OrganInfoMapper.selectByPrimaryKey"))
    })

    RdsResourceObject selectByPrimaryKey(String id);
}
